<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 * Description of NivelController
 *
 * @author dliebel
 */
namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

use Application\Model\Nivel;


class NivelController extends AbstractActionController
{
    public $dbAdapter;
    public function indexAction()
    {
        $this->dbAdapter=$this->getServiceLocator()->get('Zend\Db\Adapter');
      
        $nivel = new Nivel('nivel', $this->dbAdapter);   
        $datos=  $nivel->getObjects();
        return new ViewModel(array("titulo"=>"Lista de Nivel","datos"=>$datos));
    }
}

